import request from '../utils/request'

export function getAreaCode(data) {
  return request({
    url: '/applet/api/prod/getAreaCode',
    method: 'POST',
	data: data
  })
}

// 查字典
export function getCommenKey(data) {
  return request({
    url: '/applet/api/common/type/' + data,
    method: 'GET'
  })
}

// 获取客服电话，协议等
export function getConfigKey(data) {
  return request({
    url: '/applet/api/common/getConfigKey',
    method: 'POST',
	data: data
  })
}

// 关键字
export function replaceWord(data) {
  return request({
    url: '/applet/api/common/replacement',
    method: 'POST',
	data: data
  })
}

// 登录
export function userLogin(data) {
  return request({
    url: '/auth/sppWxLogin',
    method: 'POST',
	data
  })
}

// 登录获取手机号
export function getUserPhone(data) {
  return request({
    url: '/auth/getSppWxPhone',
    method: 'POST',
	data
  })
}

// 根据月份查有日程的日期
export function qryAptWorkDay(data) {
  return request({
    url: '/applet/api/spp/qryAptWorkDay',
    method: 'POST',
	data
  })
}

// 根据日期查询日程
export function qryAptWorkDayList(data) {
  return request({
    url: '/applet/api/spp/qryWorkList',
    method: 'POST',
	data
  })
}

export function getUserInfo(data) {
  return request({
    url: '/applet/api/tyUser/getCurrentUser/' + data,
    method: 'GET'
  })
}

// 查询经销商列表
export function getParList(data) {
  return request({
    url: '/applet/api/spp/qryPar',
    method: 'POST',
	data
  })
}